﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="nRoute.Samples.Sudoku.Controls.WorkingIndicator" 
    d:DesignWidth="400" d:DesignHeight="300" mc:Ignorable="d">
	
	<!-- From http://chrisa.wordpress.com/2008/10/09/a-wait-indicator-in-silverlight/ -->
	
    <UserControl.Resources>
        <Storyboard x:Name="IndicatorStoryboard">
            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse1"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse2"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse3"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse4"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse5"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse6"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse7"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>

            <ColorAnimationUsingKeyFrames 
                                  Storyboard.TargetName="Ellipse8"
                                  Storyboard.TargetProperty="(Fill).(SolidBrush.Color)"
                                  BeginTime="0" RepeatBehavior="Forever">

                <LinearColorKeyFrame Value="#9CFFFFFF" KeyTime="00:00:00" />
                <LinearColorKeyFrame Value="#6DFFFFFF" KeyTime="00:00:00.15" />
                <LinearColorKeyFrame Value="#3EFFFFFF" KeyTime="00:00:00.3" />
                <LinearColorKeyFrame Value="#2EFFFFFF" KeyTime="00:00:00.45" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.60" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.75" />
                <LinearColorKeyFrame Value="#1EFFFFFF" KeyTime="00:00:00.90" />
                <LinearColorKeyFrame Value="#CCFFFFFF" KeyTime="00:00:01.05" />
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Visibility="Collapsed">
    	<Grid.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#7F000000" Offset="0.996"/>
					<GradientStop Color="#7F000000"/>
				</LinearGradientBrush>
    	</Grid.Background>

		<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="30" Height="30">
			<Ellipse x:Name="Ellipse1" Fill="#1EFFFFFF" Canvas.Left="0" Canvas.Top="11" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse2" Fill="#1EFFFFFF" Canvas.Left="3" Canvas.Top="3" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse3" Fill="#1EFFFFFF" Canvas.Left="11" Canvas.Top="0" Height="8" Width="8" d:IsLocked="True"/>
			<Ellipse x:Name="Ellipse4" Fill="#2EFFFFFF" Canvas.Left="19" Canvas.Top="3" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse5" Fill="#3EFFFFFF" Canvas.Left="22" Canvas.Top="11" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse6" Fill="#6DFFFFFF" Canvas.Left="19" Canvas.Top="19" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse7" Fill="#9CFFFFFF" Canvas.Left="11" Canvas.Top="22" Height="8" Width="8"/>
			<Ellipse x:Name="Ellipse8" Fill="#CCFFFFFF" Canvas.Left="3" Canvas.Top="19" Height="8" Width="8"/>
		</Canvas>
	</Grid>
</UserControl>

